/**
 * ── LOS 4 PASOS DE COLOR AZUL  ──
 *
 * @format
 */

.stepper-wrapper {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 24px;
}

.step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 36px;
  cursor: pointer;
  background: #f8fafc;
  color: #ffffff;
  transition: background 0.2s;
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 50%,
    calc(100% - 20px) 100%,
    0 100%,
    20px 50%
  );
  margin-right: -1px;
  text-decoration: none;
}

.step-item:first-child {
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 50%,
    calc(100% - 20px) 100%,
    0 100%
  );
  padding-left: 20px;
}

.step-item:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20px 50%);
  margin-right: 0;
}

.step-item:hover {
  background: #e8f5e9;
  color: #234481;
}

.step-item.active {
  background: #426eff;
  color: #fff;
}

.step-item.active:hover {
  background: #2868dd;
}

/* Círculo numerado */
.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 17, 255, 0.15);
  color: inherit;
}

.step-item:nth-child(1) .step-circle {
  border-color: #0d6efd;
  color: #0d6efd;
  background: #e7f0ff;
}

.step-item:nth-child(2) .step-circle {
  border-color: #6c757d;
  color: #6c757d;
  background: #f0f0f0;
}

.step-item:nth-child(3) .step-circle {
  border-color: #ffc107;
  color: #856404;
  background: #fff8e1;
}

.step-item:nth-child(4) .step-circle {
  border-color: #1647a3;
  color: #1647a3;
  background: #e8f0ff;
}

.step-item.active .step-circle {
  background: rgba(255, 255, 255, 0.25);
  border-color: #fff;
  color: #fff;
}

/* Ícono derecho */
.step-icon {
  margin-left: auto;
  font-size: 18px;
  flex-shrink: 0;
}

.step-item:nth-child(1) .step-icon {
  color: #0d6efd;
}

.step-item:nth-child(2) .step-icon {
  color: #6c757d;
}

.step-item:nth-child(3) .step-icon {
  color: #ffc107;
}

.step-item:nth-child(4) .step-icon {
  color: #1647a3;
}

.step-item.active .step-icon {
  color: rgba(255, 255, 255, 0.85);
}

/* Texto */
.step-label {
  flex-grow: 1;
  min-width: 0;
}

.step-label h6 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-label small {
  font-size: 10px;
  opacity: 0.7;
}

.step-item.active .step-label small {
  opacity: 0.9;
}

/* Badge */
.step-item .badge {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 20px;
}

.step-item.active .badge.bg-danger {
  background-color: rgba(255, 255, 255, 0.3) !important;
  color: #fff;
}

.step-item.active .badge.bg-success {
  background-color: rgba(255, 255, 255, 0.3) !important;
  color: #fff;
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */

/* ── Tablet (768px – 991px): compactar texto e ícono ── */
@media (max-width: 991.98px) and (min-width: 768px) {
  .step-item {
    padding: 10px 14px 10px 28px;
    gap: 7px;
  }

  .step-item:first-child {
    padding-left: 14px;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .step-label h6 {
    font-size: 11px;
  }

  .step-label small {
    display: none;
  }

  /* oculta subtítulo en tablet */

  .step-icon {
    font-size: 14px;
  }

  .step-item .badge {
    display: none;
  }

  /* oculta badge en tablet */
}

/* ── Móvil (< 768px): apilado vertical ── */
@media (max-width: 767.98px) {
  .stepper-wrapper {
    flex-direction: column;
    border-radius: 12px;
    overflow: visible;
    gap: 4px;
    background: transparent;
    box-shadow: none;
  }

  .step-item,
  .step-item:first-child,
  .step-item:last-child {
    clip-path: none;
    border-radius: 10px;
    border-left: 5px solid #e5e7eb;
    margin-right: 0;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    color: #374151;
  }

  .step-item:nth-child(1) {
    border-left-color: #0d6efd;
  }

  .step-item:nth-child(2) {
    border-left-color: #6c757d;
  }

  .step-item:nth-child(3) {
    border-left-color: #ffc107;
  }

  .step-item:nth-child(4) {
    border-left-color: #1647a3;
  }

  .step-item.active {
    background: #1647a3;
    border-left-color: #1647a3;
    color: #fff;
  }

  /* Restaurar colores de círculo en móvil activo */
  .step-item.active .step-circle {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    color: #fff;
  }

  /* Restaurar íconos en móvil activo */
  .step-item.active .step-icon {
    color: rgba(255, 255, 255, 0.85);
  }

  .step-item:hover {
    transform: none;
  }

  .step-label h6 {
    font-size: 13px;
  }

  .step-label small {
    font-size: 11px;
  }

  .step-icon {
    font-size: 16px;
  }

  #denuncia-tabs {
    margin-bottom: 1rem;
  }
}

/* ── Móvil muy pequeño (< 400px): ocultar ícono decorativo ── */
@media (max-width: 399.98px) {
  .step-icon {
    display: none;
  }

  .step-circle {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .step-label h6 {
    font-size: 12px;
  }
}
